import React, { Component } from 'react'
import { ImagePicker } from 'antd-mobile'
import '../assets/style/UploadImg.less'
import { List } from 'antd-mobile';

const Item = List.Item;
const Brief = Item.Brief;

export default class findNewHouse extends Component {
    constructor(props) {
        super(props)
        this.state = {
            multiple: false,
           
        }
    }
    onChange = (files) => {
        this.props.getImg(files)
    }
    render() {
        return (
            <div className="UpLoadImg">
                <ImagePicker
                    files={this.props.ImgUrl}
                    onChange={this.onChange}
                    selectable={this.props.ImgUrl.length < 1}
                    accept="image/gif,image/jpeg,image/jpg,image/png"
                    length='1'
                />
                <Item
                    arrow="horizontal"
                    multipleLine
                    onClick={() => { }}
                >
                    上传照片
                    <Brief>
                      只能上传房屋图片，不能含有文字、数字、网址、名片、水印等所有类别图片总共20张
                    </Brief>
                </Item>
            </div>
        )
    }
}